# $LastChangedDate: 2011-09-09 00:10:19 -0400 (Fri, 09 Sep 2011) $
# LEGAL: COPYRIGHT (C) 2010 JIM E. BROOKS WWW.PALOMINO3D.ORG
# (private to project.cmake)
# Include file for beginning of project to build.
# Args: PROJECT_NAME
# Notes:
# - See module.txt.
#-------------------------------------------------------------------------------

SET( PROJECT_TARGET ${PROJECT_NAME} )
PROJECT( ${PROJECT_TARGET} )
ADD_PROJECT_INCLUDE_DIR( src )  # "src" verbatim as cmake will alter paths when it chdirs
SET( CMAKE_MODULE_PATH "CMakeModules" )  # probably limited to one path

#-------------------------------------------------------------------------------
# COMPILE_WITH() macros can compile with optional libraries.

INCLUDE( CMakeModules/libraries.cmake )

#-------------------------------------------------------------------------------
# Make directories.

# mkdir bin/
SET( OUTPUT_BINDIR ${PROJECT_BINARY_DIR}/bin )
MAKE_DIRECTORY( ${OUTPUT_BINDIR} )
SET( EXECUTABLE_OUTPUT_PATH ${OUTPUT_BINDIR} )

# mkdir lib/
SET( OUTPUT_LIBDIR ${PROJECT_BINARY_DIR}/lib )
MAKE_DIRECTORY( ${OUTPUT_LIBDIR} )
SET( LIBRARY_OUTPUT_PATH ${OUTPUT_LIBDIR} )

#-------------------------------------------------------------------------------
# C/C++ compiler args.

INCLUDE( CMakeModules/compiler.cmake )

#-------------------------------------------------------------------------------
# Macros to build modules.

INCLUDE( CMakeModules/module.cmake )
